<template>
  <el-card class="box-card el-card-flex componentsGroupNews cardHover" body-style="height:300px;overflow:hidden;padding:10px 0;">
    <div slot="header" class="clearfix">
      <span><i class="el-title-adorn"></i> 集团新闻</span>
    </div>
    <ul class="news-list" style="padding:0 10px">
      <li class="news-li" v-for="v in 10" :key="v">
        <dt class="news-title">
          【集团新闻】中国煤炭新闻网：中国大屯公司姚桥煤矿四大举措激发企业党建活力
        </dt>
        <dd class="news-date">2019-07-10</dd>
      </li>
    </ul>
    <i @click="handDelProject" class="el-icon-close closeIcon"></i>
  </el-card>
</template>
<script>
export default {
  methods: {
    // 删除任意一个布局里的项目
    handDelProject () {
      this.$emit('handDelProject')
    },
  }
}
</script>
<style lang="scss">
.componentsGroupNews {
  padding: 0 10px;
  margin-bottom: 10px;
  position: relative;
  left: 0;
  top: 0;
  text-align: left;
  .closeIcon {
    position: absolute;
    right: 0;
    top: 0;
    padding: 3px;
    border-radius: 50%;
    background-color: #eeeeee;
    display: none;
  }
  .el-title-adorn {
    border-left: 3px solid #409EFF;
		display: inline-block;
		margin-right: 2px;
		height: 16px;
		vertical-align: middle;
		margin-top: -2px;
  }
  .el-card__header {
    border-bottom: none;
    padding: 5px 0 0 0;
  }
  .news-list {
    width: calc(100% + 25px);
    height: 100%;
    overflow: auto;
    cursor: pointer;
    .news-li {
      width: calc(100% - 25px);
      line-height: 25px;
      font-size: 12px;
      position: relative;
      padding: 5px;
      // border-bottom: 1px solid #F4F6FC;
      box-sizing: border-box;
      display: table;
      &:hover {
        color: #409EFF;
        text-decoration: underline;
      }
      .news-title {
        display: table-cell;
			  vertical-align: middle;
      }
      .news-date {
        display: table-cell;
        vertical-align: middle;
        width: 100px;
      }
    }
  }
}
.cardHover {
  &:hover {
    background-color: rgba(254,227,78,.1);
    border: 1px dashed #fb9c68;
    .closeIcon {
      display: block;
    }
  }
}
</style>